﻿using System;
using System.Diagnostics;

namespace Program12_Process
{
    class Program
    {
        static void Main(string[] args)
        {
            //获取当前程序中所有正在运行的进程
            //Process[] pros = Process.GetProcesses();
            //foreach (var p in pros)
            //{
            //    Console.WriteLine(p);
            //}
            //通过应用程序打开应用的进程
            //Console.ReadKey();
            //Process.Start("calc"); 

            //Console.ReadKey();
            //Process.Start("Chrome","https://baidu.com");

            //通过进程打开指定的exe

            Console.ReadKey();
            ProcessStartInfo psi=new ProcessStartInfo(@"D:\管家软件\tencent\WeGame\wegame.exe");

            //创建进程
            Process p=new Process();
            p.StartInfo = psi;
            p.Start();
        }
    }
}
